package com.bbcare.nutritious.plat.store.ibatis;

import java.util.List;
import java.util.Map;

import com.bbcare.nutritious.plat.entity.NtFoodInfo;
import com.bbcare.nutritious.plat.entity.NtFoodLibrary;
import com.bbcare.nutritious.plat.entity.NtFoodNutrients;
import com.bbcare.nutritious.plat.entity.NtFoodType;
import com.bbcare.nutritious.plat.entity.NtNutrientsDict;

/**
 * 
 * @name:         INutritionFoodDao.java
 * @author:       tao
 * @createTime:   2017年7月3日
 * @description:  食物管理数据库操作类
 * @modify:
 *
 */
public interface INutritionFoodDao {
	//保存食物类型
	int saveFoodType(NtFoodType obj) throws Exception;
	
	//更新食物类型
    int updateFoodType(Map<String,Object> map) throws Exception;
    int updateFoodTypeByCondition(Map<String,Object> map) throws Exception;
    int deleteFoodType(Map<String,Object> map) throws Exception;
    
    //删除疗程库和租户关系
    void deleteLibraryPermission(Map<String,Object> paramMap) throws Exception;
    //食物类型详情查询
    Map<String,Object> selectFoodTypeDetail(Map<String,Object> paramMap) throws Exception;

    //查询食物类型列表
  	List<Map<String,Object>> selectFoodTypeList(Map<String,Object> paramMap) throws Exception;
  	//查询菜单子类型 
  	List<Map<String,Object>> selectFoodTypeByParent(Map<String,Object> paramMap) throws Exception;
  	//查询食物库下 是否有食物
  	int selectFoodTypeByLibrary(Map<String,Object> paramMap) throws Exception;

  	//查询食物库列表
  	List<Map<String,Object>> selectFoodLibraryList(Map<String,Object> paramMap) throws Exception;
  	int selectFoodLibraryCount(Map<String,Object> paramMap) throws Exception;
  	//新增食物库
  	int saveFoodLibrary(NtFoodLibrary obj) throws Exception;
  	//修改食物库
  	int updateFoodLibrary(NtFoodLibrary obj) throws Exception;

  	
  	//查询食物类型列表总数
  	int selectFoodTypeCount(Map<String,Object> paramMap);
  	
  	//添加食物
  	int saveFood(NtFoodInfo obj) throws Exception;
  	
  	//修改食物
  	int updateFood(NtFoodInfo obj) throws Exception;

  	//删除食物类型下的 所有食物
  	void deleteFoodByTypeId(Map<String,Object> paramMap) throws Exception;
  	//根据菜单删除食物类型
  	void deleteFoodNutrientByTypeId(Map<String,Object> paramMap) throws Exception;
  	
    //查询食物列表
  	List<Map<String,Object>> selectFoodList(Map<String,Object> paramMap);
  	
  	//根据id查询食物信息
  	NtFoodInfo selectFoodById(Map<String,Object> paramMap);
  	
  	//查询食物列表总数
  	int selectFoodCount(Map<String,Object> paramMap);
  	
  	//查询营养成分字典列表
  	List<NtNutrientsDict> selectNutrientList(Map<String,Object> paramMap);
  	
  	//查询食物营养成分字典列表
  	List<Map<String,Object>> selectFoodNutrientList(Map<String,Object> paramMap);
  	
  	//食物营养成分含量新增
  	void saveFoodNutrientList(List<NtFoodNutrients> list);
  	
  	//根据食物ID删除营养成分
  	void deleleFoodNutrient(Map<String,Object> paramMap);
  	
  	
}
